import { useDispatch, useSelector } from 'react-redux'
import { useEffect } from 'react'

const Index = () => {
  const state = useSelector(state => {
    return state;
  })

  console.log(state);

  const dispatch = useDispatch();

  useEffect(() => {
    setTimeout(() => {
      dispatch({
        type: 'ARTICLE_ADD'
      })
    }, 5000)
  }, []);

  return (
    <div>
      <p>测试reducers</p>
    </div>
  )
}

export default Index;